package com.yzcity.cinema.service.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.time.Instant;
import java.time.LocalDate;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

/**
 * A DTO for the {@link com.yzcity.cinema.domain.Movie} entity.
 */
@ApiModel(description = "电影")
public class MovieDTO implements Serializable {
    
    private Long id;

    /**
     * 中文名称
     */
    @NotNull
    @Size(max = 20)
    @ApiModelProperty(value = "中文名称", required = true)
    private String cname;

    /**
     * 英文名称
     */
    @NotNull
    @Size(max = 20)
    @ApiModelProperty(value = "英文名称", required = true)
    private String ename;

    /**
     * 导演
     */
    @NotNull
    @Size(max = 30)
    @ApiModelProperty(value = "导演", required = true)
    private String director;

    /**
     * 演员
     */
    @NotNull
    @ApiModelProperty(value = "演员", required = true)
    private String actor;

    /**
     * 类型
     */
    @NotNull
    @Size(max = 100)
    @ApiModelProperty(value = "类型", required = true)
    private String type;

    /**
     * 时长
     */
    @NotNull
    @ApiModelProperty(value = "时长", required = true)
    private Integer time;

    /**
     * 剧情简介
     */
    @NotNull
    @ApiModelProperty(value = "剧情简介", required = true)
    private String introduction;

    /**
     * 图集
     */
    @NotNull
    @ApiModelProperty(value = "图集", required = true)
    private String img;

    /**
     * 票价
     */
    @NotNull
    @ApiModelProperty(value = "票价", required = true)
    private Long price;

    /**
     * 上映地点
     */
    @NotNull
    @Size(max = 20)
    @ApiModelProperty(value = "上映地点", required = true)
    private String showingSite;

    /**
     * 上映时间
     */
    @NotNull
    @ApiModelProperty(value = "上映时间", required = true)
    private LocalDate showTime;

    /**
     * 票房
     */
    @NotNull
    @ApiModelProperty(value = "票房", required = true)
    private Long ticketCount;

    /**
     * 想看数
     */
    @NotNull
    @ApiModelProperty(value = "想看数", required = true)
    private Long wantWatch;

    /**
     * 创建人
     */
    @Size(max = 30)
    @ApiModelProperty(value = "创建人")
    private String createdBy;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Instant createdTime;

    /**
     * 最后更新人
     */
    @Size(max = 30)
    @ApiModelProperty(value = "最后更新人")
    private String lastModifiedBy;

    /**
     * 最后更新时间
     */
    @ApiModelProperty(value = "最后更新时间")
    private Instant lastModifiedTime;

    private Set<ActorDTO> actors = new HashSet<>();
    
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCname() {
        return cname;
    }

    public void setCname(String cname) {
        this.cname = cname;
    }

    public String getEname() {
        return ename;
    }

    public void setEname(String ename) {
        this.ename = ename;
    }

    public String getDirector() {
        return director;
    }

    public void setDirector(String director) {
        this.director = director;
    }

    public String getActor() {
        return actor;
    }

    public void setActor(String actor) {
        this.actor = actor;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Integer getTime() {
        return time;
    }

    public void setTime(Integer time) {
        this.time = time;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public Long getPrice() {
        return price;
    }

    public void setPrice(Long price) {
        this.price = price;
    }

    public String getShowingSite() {
        return showingSite;
    }

    public void setShowingSite(String showingSite) {
        this.showingSite = showingSite;
    }

    public LocalDate getShowTime() {
        return showTime;
    }

    public void setShowTime(LocalDate showTime) {
        this.showTime = showTime;
    }

    public Long getTicketCount() {
        return ticketCount;
    }

    public void setTicketCount(Long ticketCount) {
        this.ticketCount = ticketCount;
    }

    public Long getWantWatch() {
        return wantWatch;
    }

    public void setWantWatch(Long wantWatch) {
        this.wantWatch = wantWatch;
    }

    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    public Instant getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Instant createdTime) {
        this.createdTime = createdTime;
    }

    public String getLastModifiedBy() {
        return lastModifiedBy;
    }

    public void setLastModifiedBy(String lastModifiedBy) {
        this.lastModifiedBy = lastModifiedBy;
    }

    public Instant getLastModifiedTime() {
        return lastModifiedTime;
    }

    public void setLastModifiedTime(Instant lastModifiedTime) {
        this.lastModifiedTime = lastModifiedTime;
    }

    public Set<ActorDTO> getActors() {
        return actors;
    }

    public void setActors(Set<ActorDTO> actors) {
        this.actors = actors;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof MovieDTO)) {
            return false;
        }

        return id != null && id.equals(((MovieDTO) o).id);
    }

    @Override
    public int hashCode() {
        return 31;
    }

    // prettier-ignore
    @Override
    public String toString() {
        return "MovieDTO{" +
            "id=" + getId() +
            ", cname='" + getCname() + "'" +
            ", ename='" + getEname() + "'" +
            ", director='" + getDirector() + "'" +
            ", actor='" + getActor() + "'" +
            ", type='" + getType() + "'" +
            ", time=" + getTime() +
            ", introduction='" + getIntroduction() + "'" +
            ", img='" + getImg() + "'" +
            ", price=" + getPrice() +
            ", showingSite='" + getShowingSite() + "'" +
            ", showTime='" + getShowTime() + "'" +
            ", ticketCount=" + getTicketCount() +
            ", wantWatch=" + getWantWatch() +
            ", createdBy='" + getCreatedBy() + "'" +
            ", createdTime='" + getCreatedTime() + "'" +
            ", lastModifiedBy='" + getLastModifiedBy() + "'" +
            ", lastModifiedTime='" + getLastModifiedTime() + "'" +
            ", actors='" + getActors() + "'" +
            "}";
    }
}
